package com.share.device.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.share.device.domain.CabinetSlot;
import com.share.device.mapper.CabinetSlotMapper;
import com.share.device.service.ICabinetSlotService;
import org.springframework.stereotype.Service;

@Service
public class CabinetSlotServiceImpl extends ServiceImpl<CabinetSlotMapper, CabinetSlot> implements ICabinetSlotService {

    /**
     * 根据柜机id,插槽编号,查询柜机插槽
     */
    @Override
    public CabinetSlot getBtSlotNo(Long cabinetId, String slotNo) {
        return this.baseMapper.selectOne(new LambdaQueryWrapper<CabinetSlot>().eq(CabinetSlot::getCabinetId, cabinetId).eq(CabinetSlot::getSlotNo, slotNo));
    }
}
